<template>
	<view class="content flex flex-col justify-center">
		<image src="@/applyPages/static/icon-rebuild.svg" mode="widthFix" class="icon-loading"></image>
		<view class="load-text">链接失效</view>
		<view class="load-tip">邀请链接已过期，您的专享权益已失效</view>
		<view class="release-btn" @click="nextStep">仍要入驻</view>
	</view>
</template>

<script setup>
	import {applyBusiness} from '@/api/businessEnterApply.js'
	const props = defineProps({
		settleData: {
			type: Object 
		},
		baseData: {
			type: Object 
		}
	})
	import {
		useUserStore
	} from '@/stores/modules/user.js'
	const userStore = useUserStore()
	const nextStep = async () => {
		let data = Object.assign(props.settleData,props.baseData)
		data.openid = uni.getStorageSync('openId')
		data.settleCode = ''
		uni.showLoading()
		let result = await applyBusiness(data)
		if(result){
			emit('nextStep',{step:4})
		}else{
			if(result.code==10012){
				emit('nextStep',{step:5})
			}
		}
		uni.hideLoading()
	}
</script>

<style scoped lang="scss">
	.content{
		position: relative;
		z-index: 1;
	}
	.icon-loading{
		width: 100px;
		margin: 20px auto;
	}
	.load-text{
		font-size: 16px;
		font-weight: 600;
		line-height: 22px;
		text-align: center;
	}
	.load-tip{
		font-size: 12px;
		font-weight: 400;
		line-height: 17px;
		text-align: center;
		color: rgba(51, 51, 51, 0.6);
		margin-top: 12px;
	}
	.load-msg{
		margin: 20px;
		padding: 10px;
		background: rgba(245, 245, 245, 1);
		border-radius: 12px;
		font-size: 12px;
		font-weight: 400;
		line-height: 17px;
		text-align: center;
		color: rgba(51, 51, 51, 0.6);
	}
	.release-btn {
		// width: 343px;
		height: 46px;
		padding: 12px, 20px, 12px, 20px;
		border-radius: 8px;
		// gap: 10px;
		background: #FA4543;
		color: #ffffff;
		margin: 20px 20px;
		text-align: center;
		line-height: 46px;
	
		&.unactive {
			background: rgba(169, 171, 172, 1);
		}
	}
</style>